{{ header }}
{% set theme_options = registry.get('theme_options') %}
{% set config = registry.get('config') %}
{% set page_direction = theme_options.get( 'page_direction' ) %}
{% set language_id = config.get( 'config_language_id' ) %}
{% set background_status = constant('false') %}
{% include 'fastor/template/new_elements/wrapper_top.twig' %}

<div id="mfilter-content-container">
  {% if (products) %}
  {% set currently = theme_options.getCurrently() %}

  {% set class = 3 %}
  {% set row = 4 %}

  {% if (theme_options.get( 'product_per_pow' ) == 6) %} {% set class = 2 %} {% endif %}
  {% if (theme_options.get( 'product_per_pow' ) == 5) %} {% set class = 25 %} {% endif %}
  {% if (theme_options.get( 'product_per_pow' ) == 3) %} {% set class = 4 %} {% endif %}

  {% if (theme_options.get( 'product_per_pow' ) > 1) %} {% set row = theme_options.get( 'product_per_pow' ) %} {% endif %}

  <div class="product-grid active">
      <div class="row">
          {% set row_fluid = 0 %} {% for product in products %} {% set row_fluid = row_fluid + 1 %}
              {% set r=row_fluid-(row_fluid/row)|round(0, 'floor')*row %} {% if (row_fluid>row and r == 1) %} {{ '</div><div class="row">' }} {% endif %}
              <div class="col-sm-{{ class }} col-xs-6">
                  {% include 'fastor/template/new_elements/product.twig' %}
              </div>
          {% endfor %}
      </div>
  </div>

  <div class="row pagination-results">
    <div class="col-sm-6 text-left">{{ pagination }}</div>
    <div class="col-sm-6 text-right">{{ results }}</div>
  </div>
  {% else %}
  <p style="padding-top: 30px">{{ text_empty }}</p>
  <div class="buttons">
    <div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
  </div>
  {% endif %}

</div>

{% include 'fastor/template/new_elements/wrapper_bottom.twig' %}
{{ footer }}
